1. Field of the Invention
This invention relates in general to database management systems performed by computers, and in particular, to the simultaneous computation of multiple moving aggregates for an on-line analytical processing (OLAP) system that uses a relational database management system (RDBMS).
2. Description of Related Art.
On-Line Analytical Processing (OLAP) systems provide tools for analysis of multidimensional data. Most systems are built using a three-tier architecture, wherein the first or client tier provides a graphical user interface (GUI) or other application, the second or middle tier provides a multi-dimensional view of the data, and the third or server tier comprises a relational database management system (RDBMS) that stores the data.
Most queries in OLAP systems are complex and require the aggregation of large amounts of data. In OLAP systems, expressions and aggregates are often generated by user-defined metrics. Examples of such metrics include running averages of sales over various time windows, actual vs. forecast profit margins, and many others. Often, one metric is defined in terms of another, e.g., profit may be defined in terms of sales and various costs. Frequently, a single user query will request multiple metrics, and each metric may have many component sub-metrics. The result is a complex set of expressions and aggregates, which provide the potential for sharing and re-use during evaluation.
However, decision support applications in OLAP systems need to be interactive and demand fast response times. Different techniques to speed up queries have been studied and implemented, both in research and industrial systems. Generally, these different techniques do not provide dramatic performance improvements. Thus, there is a need in the art for improved performance in OLAP systems.
An On-Line Analytic Processing (OLAP) system identifies a plurality of simultaneously computable moving aggregate functions in a query. The moving aggregate functions are then partitioned into sets that can be computed simultaneously based on equivalent sort expressions. Finally, the OLAP system generates an access plan that executes the partitioned sets simultaneously.